package com.th.apicenter.cainiao;

import com.th.apicenter.cainiao.entity.ThCainiaoData;
import com.th.apicenter.cainiao.service.CainiaoService;
import com.th.apicenter.tools.ThResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


@RestController
@RequestMapping("/cainiao")
public class CainiaoController {

    @Autowired
    private CainiaoService cainiaoService;

    @GetMapping("/getPopularizeMaterial")
    public ThResult getPopularizeMaterial() {
        List<ThCainiaoData> popularizeMaterial = cainiaoService.getPopularizeMaterial();
        return ThResult.success(popularizeMaterial);
    }


}
